import request from "@/utils/request";

// 创建电梯api
export function createElevator(data) {
  return request({
    url: "/elevator/v1/create",
    method: "post",
    data: data,
  });
}

// 获取电梯api
export function getElevator(params) {
  return request({
    url: "/elevator/v1/list",
    method: "get",
    params: params,
  });
}

// 更新电梯api
export function updateElevator(data) {
  return request({
    url: "/elevator/v1/update",
    method: "put",
    data: data,
  });
}

// 删除电梯api
export function deleteElevator(id) {
  return request({
    url: "/elevator/v1/delete/" + id,
    method: "delete",
  });
}

// 同步电梯api
export function syncElevator(id) {
  return request({
    url: "/elevator/v1/syncElevator/" + id,
    timeout: 60 * 1000,
    method: "get",
  });
}
